package com.demo.ref;

import java.lang.reflect.Method;
import java.util.Date;

import com.hui.utils.Convert;

public class RefTest2 {
	public static void main(String[] args) throws NoSuchMethodException, SecurityException {
		Class<?> obj = Convert.class;
		try {
			Object objs = obj.newInstance();
			Method m = obj.getMethod("getDateString",Date.class,String.class);
			
			System.out.println(m.invoke(objs,new Date(),"yyyy-MM-dd"));
			
		}  catch (Exception e) {
			e.printStackTrace();
		}
		
	}

}
